/*
 Navicat Premium Data Transfer

 Source Server         : localhostDB
 Source Server Type    : MySQL
 Source Server Version : 80026
 Source Host           : localhost:3306
 Source Schema         : logistics-repair

 Target Server Type    : MySQL
 Target Server Version : 80026
 File Encoding         : 65001

 Date: 20/11/2023 22:02:24
*/

SET NAMES utf8mb4;
SET FOREIGN_KEY_CHECKS = 0;

-- ----------------------------
-- Table structure for admin
-- ----------------------------
DROP TABLE IF EXISTS `admin`;
CREATE TABLE `admin` (
  `account` varchar(48) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '身份证号',
  `password` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '密码',
  `name` varchar(20) COLLATE utf8mb4_general_ci NOT NULL COMMENT '姓名',
  `phone` varchar(11) COLLATE utf8mb4_general_ci NOT NULL COMMENT '手机号',
  `email` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '邮箱',
  `register_time` datetime NOT NULL COMMENT '注册时间',
  PRIMARY KEY (`account`),
  UNIQUE KEY `id_number` (`account`) USING BTREE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci COMMENT='管理员';

-- ----------------------------
-- Records of admin
-- ----------------------------
BEGIN;
INSERT INTO `admin` VALUES ('6949957e74ac0c34fb6e5d0e3d531611', '0981e356d38293e7042d32354cf8a8ad', 'admin', '13455899989', 'kirud@163.net', '2022-05-16 23:57:17');
INSERT INTO `admin` VALUES ('6f3f15c2d6d4e6f9db3f75f4fe849fb8', '0981e356d38293e7042d32354cf8a8ad', '张健强', '15281053325', 'scitcfaxgegb@qq.com', '2022-05-16 22:30:04');
COMMIT;

-- ----------------------------
-- Table structure for admin_job_record
-- ----------------------------
DROP TABLE IF EXISTS `admin_job_record`;
CREATE TABLE `admin_job_record` (
  `account` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '身份证号',
  `on_guard` bit(1) NOT NULL COMMENT '是否在岗',
  `starting_date` datetime DEFAULT NULL COMMENT '上岗时间',
  `laid_off_time` datetime DEFAULT NULL COMMENT '下岗时间',
  PRIMARY KEY (`account`),
  CONSTRAINT `admin_job_record_ibfk_1` FOREIGN KEY (`account`) REFERENCES `admin` (`account`) ON DELETE CASCADE ON UPDATE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci COMMENT='管理员工作记录';

-- ----------------------------
-- Records of admin_job_record
-- ----------------------------
BEGIN;
INSERT INTO `admin_job_record` VALUES ('6949957e74ac0c34fb6e5d0e3d531611', b'1', '2022-05-17 00:06:13', '2022-05-17 00:13:32');
INSERT INTO `admin_job_record` VALUES ('6f3f15c2d6d4e6f9db3f75f4fe849fb8', b'1', '2022-05-17 00:15:37', '2022-05-17 00:06:13');
COMMIT;

-- ----------------------------
-- Table structure for apply_material
-- ----------------------------
DROP TABLE IF EXISTS `apply_material`;
CREATE TABLE `apply_material` (
  `apply_id` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '申报单号',
  `order_id` varchar(32) COLLATE utf8mb4_general_ci NOT NULL COMMENT '订单编号',
  `material_id` varchar(26) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '材料编号',
  `material_price` float(5,1) NOT NULL COMMENT '材料价格',
  `take_amount` int NOT NULL COMMENT '取量',
  `apply_time` datetime NOT NULL COMMENT '申请时间',
  `apply_status` bit(1) NOT NULL DEFAULT b'0' COMMENT '申请状态（1已完成，0未完成）',
  `charge_on` bit(1) NOT NULL DEFAULT b'0' COMMENT '开启收费（1开启，0关闭）',
  `charge_status` bit(1) NOT NULL DEFAULT b'0' COMMENT '收费状态（1收费完成，0未收费）',
  `charge_time` datetime DEFAULT NULL,
  PRIMARY KEY (`apply_id`) USING BTREE,
  KEY `order_id` (`order_id`),
  KEY `material_id` (`material_id`),
  CONSTRAINT `apply_material_ibfk_1` FOREIGN KEY (`order_id`) REFERENCES `repair_orders` (`order_id`) ON DELETE CASCADE ON UPDATE CASCADE,
  CONSTRAINT `apply_material_ibfk_2` FOREIGN KEY (`material_id`) REFERENCES `material_library` (`material_id`) ON DELETE CASCADE ON UPDATE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci COMMENT='申报材料';

-- ----------------------------
-- Records of apply_material
-- ----------------------------
BEGIN;
INSERT INTO `apply_material` VALUES ('1527522249404420097', '20220520132541320460', '1508761301021634562', 20.4, 10, '2022-05-20 13:30:59', b'1', b'1', b'1', '2022-05-20 13:46:40');
INSERT INTO `apply_material` VALUES ('1527522249433780225', '20220520132541320460', '1508761300803530753', 21.0, 10, '2022-05-20 13:30:59', b'1', b'1', b'1', '2022-05-20 13:46:40');
COMMIT;

-- ----------------------------
-- Table structure for material_library
-- ----------------------------
DROP TABLE IF EXISTS `material_library`;
CREATE TABLE `material_library` (
  `material_id` varchar(26) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '材料编号',
  `material_name` varchar(20) COLLATE utf8mb4_general_ci NOT NULL COMMENT '材料名称',
  `material_price` float(5,2) NOT NULL COMMENT '材料价格',
  `material_amount` int NOT NULL COMMENT '材料数量',
  `material_version` int NOT NULL DEFAULT '0' COMMENT '版本控制',
  PRIMARY KEY (`material_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci COMMENT='材料库';

-- ----------------------------
-- Records of material_library
-- ----------------------------
BEGIN;
INSERT INTO `material_library` VALUES ('1508761300803530753', '节能灯', 21.00, 90, 1);
INSERT INTO `material_library` VALUES ('1508761301021634562', '日光灯管', 20.40, 90, 1);
INSERT INTO `material_library` VALUES ('1508761301034217473', '声控开关', 20.00, 100, 0);
INSERT INTO `material_library` VALUES ('1508761301034217474', '自攻螺丝', 12.50, 100, 0);
INSERT INTO `material_library` VALUES ('1508761301034217475', '绝缘胶布', 20.00, 100, 0);
INSERT INTO `material_library` VALUES ('1508761301034217476', '明装开关', 18.50, 100, 0);
INSERT INTO `material_library` VALUES ('1508761301034217477', '吊灯头', 20.00, 100, 0);
INSERT INTO `material_library` VALUES ('1508761301034217478', '防水胶带', 5.50, 100, 0);
INSERT INTO `material_library` VALUES ('1508761301034217479', '防水灯罩', 22.80, 100, 0);
INSERT INTO `material_library` VALUES ('1508761301034217480', '明插座', 16.40, 100, 0);
COMMIT;

-- ----------------------------
-- Table structure for order_process
-- ----------------------------
DROP TABLE IF EXISTS `order_process`;
CREATE TABLE `order_process` (
  `order_id` varchar(32) COLLATE utf8mb4_general_ci NOT NULL COMMENT '订单编号',
  `contact_confirmation` varchar(7) COLLATE utf8mb4_general_ci DEFAULT NULL COMMENT '联系确认',
  `apply_material` varchar(7) COLLATE utf8mb4_general_ci DEFAULT NULL COMMENT '申报材料',
  `charge_on` varchar(7) COLLATE utf8mb4_general_ci DEFAULT NULL COMMENT '收费开启',
  `order_completed` varchar(7) COLLATE utf8mb4_general_ci DEFAULT NULL COMMENT '订单完结',
  PRIMARY KEY (`order_id`),
  CONSTRAINT `order_process_ibfk_1` FOREIGN KEY (`order_id`) REFERENCES `repair_orders` (`order_id`) ON DELETE CASCADE ON UPDATE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci COMMENT='订单处理进度';

-- ----------------------------
-- Records of order_process
-- ----------------------------
BEGIN;
INSERT INTO `order_process` VALUES ('20220520132520809678', 'success', 'error', 'error', 'success');
INSERT INTO `order_process` VALUES ('20220520132541320460', 'success', 'success', 'success', 'success');
COMMIT;

-- ----------------------------
-- Table structure for permission
-- ----------------------------
DROP TABLE IF EXISTS `permission`;
CREATE TABLE `permission` (
  `perm_id` varchar(32) COLLATE utf8mb4_general_ci NOT NULL COMMENT '权限ID',
  `perm_name` varchar(32) COLLATE utf8mb4_general_ci NOT NULL COMMENT '权限名',
  PRIMARY KEY (`perm_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci COMMENT='系统权限';

-- ----------------------------
-- Records of permission
-- ----------------------------
BEGIN;
INSERT INTO `permission` VALUES ('1524673997420122114', 'worker');
INSERT INTO `permission` VALUES ('1524674021336043521', 'user');
INSERT INTO `permission` VALUES ('1524696903835471873', '财务管理');
INSERT INTO `permission` VALUES ('1524696922055528449', '订单管理');
INSERT INTO `permission` VALUES ('1524696944767684610', '权限管理');
INSERT INTO `permission` VALUES ('1526097868996259841', '删除管理员');
INSERT INTO `permission` VALUES ('1526200647890870274', '添加管理员');
INSERT INTO `permission` VALUES ('1526200943757074434', '首页');
INSERT INTO `permission` VALUES ('1526205632447881218', '管理员管理');
INSERT INTO `permission` VALUES ('1526205658733584386', '维修员管理');
INSERT INTO `permission` VALUES ('1526205682712420354', '普通用户管理');
INSERT INTO `permission` VALUES ('1527162593431572481', '公告管理');
COMMIT;

-- ----------------------------
-- Table structure for repair_orders
-- ----------------------------
DROP TABLE IF EXISTS `repair_orders`;
CREATE TABLE `repair_orders` (
  `order_id` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '订单编号',
  `user_openid` varchar(30) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '用户标识',
  `type_mark` int NOT NULL COMMENT '报修类型',
  `repair_address` varchar(16) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '报修地址',
  `repair_content` varchar(30) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT NULL COMMENT '报修内容',
  `repair_phone` varchar(11) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '联系号码',
  `repair_date` datetime NOT NULL COMMENT '报修日期',
  `status_code` int NOT NULL COMMENT '维修状态',
  `repair_version` int NOT NULL DEFAULT '0' COMMENT '维修版本标识',
  `repair_complate_date` datetime DEFAULT NULL COMMENT '报修完成日期',
  `worker_openid` varchar(30) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT NULL COMMENT '维修员标识',
  `reject_reason` varchar(30) COLLATE utf8mb4_general_ci DEFAULT NULL COMMENT '驳回原因',
  `img_url` text CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci COMMENT '图片地址',
  PRIMARY KEY (`order_id`),
  KEY `order_form_ibfk_2` (`type_mark`),
  KEY `order_form_ibfk_3` (`status_code`),
  KEY `repair_orders_ibfk_1` (`user_openid`),
  KEY `repair_orders_ibfk_4` (`worker_openid`),
  CONSTRAINT `repair_orders_ibfk_1` FOREIGN KEY (`user_openid`) REFERENCES `user` (`user_openid`),
  CONSTRAINT `repair_orders_ibfk_2` FOREIGN KEY (`type_mark`) REFERENCES `repair_type` (`type_mark`) ON DELETE CASCADE ON UPDATE CASCADE,
  CONSTRAINT `repair_orders_ibfk_3` FOREIGN KEY (`status_code`) REFERENCES `repair_status` (`status_code`) ON DELETE CASCADE ON UPDATE CASCADE,
  CONSTRAINT `repair_orders_ibfk_4` FOREIGN KEY (`worker_openid`) REFERENCES `worker` (`worker_openid`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci COMMENT='报修订单';

-- ----------------------------
-- Records of repair_orders
-- ----------------------------
BEGIN;
INSERT INTO `repair_orders` VALUES ('20220520132506344448', 'oGFtu6W6ZWr6Adyu0x9yvnS2XWuk', 1, '3423', '厕所问题', '15281056531', '2022-05-20 13:25:06', 2, 1, NULL, 'oGFtu6Y6YOKauWPMHZV36LXIQy9M', NULL, NULL);
INSERT INTO `repair_orders` VALUES ('20220520132520809678', 'oGFtu6W6ZWr6Adyu0x9yvnS2XWuk', 2, '3423', '厕所', '15281056531', '2022-05-20 13:25:20', 3, 1, '2022-05-20 14:36:01', 'oGFtu6Y6YOKauWPMHZV36LXIQy9M', NULL, NULL);
INSERT INTO `repair_orders` VALUES ('20220520132541320460', 'oGFtu6W6ZWr6Adyu0x9yvnS2XWuk', 2, '3423', '漏水', '15281056531', '2022-05-20 13:25:41', 3, 1, '2022-05-20 14:36:23', 'oGFtu6Y6YOKauWPMHZV36LXIQy9M', NULL, NULL);
COMMIT;

-- ----------------------------
-- Table structure for repair_status
-- ----------------------------
DROP TABLE IF EXISTS `repair_status`;
CREATE TABLE `repair_status` (
  `status_code` int NOT NULL COMMENT '状态码',
  `status_value` varchar(6) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT NULL COMMENT '状态值',
  PRIMARY KEY (`status_code`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci COMMENT='报修状态 ';

-- ----------------------------
-- Records of repair_status
-- ----------------------------
BEGIN;
INSERT INTO `repair_status` VALUES (1, '待受理');
INSERT INTO `repair_status` VALUES (2, '已受理');
INSERT INTO `repair_status` VALUES (3, '已完结');
INSERT INTO `repair_status` VALUES (4, '已驳回');
INSERT INTO `repair_status` VALUES (5, '待完结');
COMMIT;

-- ----------------------------
-- Table structure for repair_type
-- ----------------------------
DROP TABLE IF EXISTS `repair_type`;
CREATE TABLE `repair_type` (
  `type_mark` int NOT NULL COMMENT '标识',
  `type_value` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '类型',
  `type_hot` tinyint(1) DEFAULT '0' COMMENT '热点',
  PRIMARY KEY (`type_mark`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci COMMENT='报修类型';

-- ----------------------------
-- Records of repair_type
-- ----------------------------
BEGIN;
INSERT INTO `repair_type` VALUES (1, '零星报修', 1);
INSERT INTO `repair_type` VALUES (2, '水电报修', 1);
INSERT INTO `repair_type` VALUES (3, '房屋报修', 1);
INSERT INTO `repair_type` VALUES (4, '设备报修', 0);
INSERT INTO `repair_type` VALUES (5, '工程报修', 0);
COMMIT;

-- ----------------------------
-- Table structure for role
-- ----------------------------
DROP TABLE IF EXISTS `role`;
CREATE TABLE `role` (
  `role_id` varchar(32) COLLATE utf8mb4_general_ci NOT NULL COMMENT '角色ID',
  `role_name` varchar(21) COLLATE utf8mb4_general_ci NOT NULL COMMENT '角色名',
  PRIMARY KEY (`role_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci COMMENT='系统角色';

-- ----------------------------
-- Records of role
-- ----------------------------
BEGIN;
INSERT INTO `role` VALUES ('1524642387031244802', '管理员');
INSERT INTO `role` VALUES ('1524642919015792641', '维修员');
INSERT INTO `role` VALUES ('1524642948199759874', '普通用户');
COMMIT;

-- ----------------------------
-- Table structure for role_permission
-- ----------------------------
DROP TABLE IF EXISTS `role_permission`;
CREATE TABLE `role_permission` (
  `role_id` varchar(32) COLLATE utf8mb4_general_ci NOT NULL COMMENT '角色ID',
  `permission_id` varchar(32) COLLATE utf8mb4_general_ci NOT NULL COMMENT '权限ID',
  KEY `role_permission_ibfk_1` (`role_id`),
  KEY `permission_id` (`permission_id`),
  CONSTRAINT `role_permission_ibfk_1` FOREIGN KEY (`role_id`) REFERENCES `role` (`role_id`) ON DELETE CASCADE ON UPDATE CASCADE,
  CONSTRAINT `role_permission_ibfk_2` FOREIGN KEY (`permission_id`) REFERENCES `permission` (`perm_id`) ON DELETE CASCADE ON UPDATE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci COMMENT='角色权限关联表';

-- ----------------------------
-- Records of role_permission
-- ----------------------------
BEGIN;
INSERT INTO `role_permission` VALUES ('1524642919015792641', '1524673997420122114');
INSERT INTO `role_permission` VALUES ('1524642948199759874', '1524674021336043521');
INSERT INTO `role_permission` VALUES ('1524642387031244802', '1526200943757074434');
COMMIT;

-- ----------------------------
-- Table structure for user
-- ----------------------------
DROP TABLE IF EXISTS `user`;
CREATE TABLE `user` (
  `user_openid` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '唯一用户标识',
  `user_nickname` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT NULL COMMENT '昵称',
  `user_headimgurl` varchar(254) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT NULL COMMENT '头像',
  `user_register_time` datetime NOT NULL COMMENT '注册时间',
  PRIMARY KEY (`user_openid`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci COMMENT='普通用户';

-- ----------------------------
-- Records of user
-- ----------------------------
BEGIN;
INSERT INTO `user` VALUES ('oGFtu6W6ZWr6Adyu0x9yvnS2XWuk', 'W', 'https://thirdwx.qlogo.cn/mmopen/vi_32/Q0j4TwGTfTJ8Hzv8ic0nkj056G9MwGIyicpficzNhhjV13tUq2QgNCwdKdoz7qW5TOfqU8ww5PFUr3yRRokcl9iayQ/132', '2022-05-20 13:24:30');
INSERT INTO `user` VALUES ('oGFtu6YjZHuqYMXauIqQKRDOnq2Q', '无奈', 'https://thirdwx.qlogo.cn/mmopen/vi_32/dMSRV9aBDzdjaCIKVT4VXtNQbzOVTjAajyPlZUWnAhVUibySmBoZFTBKSgRgka5eGuVzfLicWZ8SuFhWAEpAAbJg/132', '2022-04-24 22:41:13');
COMMIT;

-- ----------------------------
-- Table structure for user_permission
-- ----------------------------
DROP TABLE IF EXISTS `user_permission`;
CREATE TABLE `user_permission` (
  `user_id` varchar(32) COLLATE utf8mb4_general_ci DEFAULT NULL COMMENT '用户ID',
  `permission_id` varchar(32) COLLATE utf8mb4_general_ci DEFAULT NULL COMMENT '权限ID',
  KEY `user_id` (`user_id`),
  KEY `permission_id` (`permission_id`),
  CONSTRAINT `user_permission_ibfk_1` FOREIGN KEY (`user_id`) REFERENCES `user_role` (`user_id`) ON DELETE CASCADE ON UPDATE CASCADE,
  CONSTRAINT `user_permission_ibfk_2` FOREIGN KEY (`permission_id`) REFERENCES `permission` (`perm_id`) ON DELETE CASCADE ON UPDATE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci COMMENT='用户权限关联表';

-- ----------------------------
-- Records of user_permission
-- ----------------------------
BEGIN;
INSERT INTO `user_permission` VALUES ('6949957e74ac0c34fb6e5d0e3d531611', '1524696944767684610');
INSERT INTO `user_permission` VALUES ('6949957e74ac0c34fb6e5d0e3d531611', '1526200647890870274');
INSERT INTO `user_permission` VALUES ('6949957e74ac0c34fb6e5d0e3d531611', '1526205632447881218');
INSERT INTO `user_permission` VALUES ('6949957e74ac0c34fb6e5d0e3d531611', '1526200943757074434');
INSERT INTO `user_permission` VALUES ('6949957e74ac0c34fb6e5d0e3d531611', '1526205658733584386');
INSERT INTO `user_permission` VALUES ('6949957e74ac0c34fb6e5d0e3d531611', '1526097868996259841');
INSERT INTO `user_permission` VALUES ('6949957e74ac0c34fb6e5d0e3d531611', '1524696922055528449');
INSERT INTO `user_permission` VALUES ('6949957e74ac0c34fb6e5d0e3d531611', '1524696903835471873');
INSERT INTO `user_permission` VALUES ('6949957e74ac0c34fb6e5d0e3d531611', '1526205682712420354');
INSERT INTO `user_permission` VALUES ('6949957e74ac0c34fb6e5d0e3d531611', '1527162593431572481');
COMMIT;

-- ----------------------------
-- Table structure for user_role
-- ----------------------------
DROP TABLE IF EXISTS `user_role`;
CREATE TABLE `user_role` (
  `user_id` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '用户ID',
  `role_id` varchar(32) COLLATE utf8mb4_general_ci NOT NULL COMMENT '角色ID',
  `enabled` bit(1) NOT NULL DEFAULT b'1' COMMENT '是否可用(1 表可用；0 表禁用)',
  KEY `user_id` (`user_id`),
  KEY `user_role_ibfk_1` (`role_id`),
  CONSTRAINT `user_role_ibfk_1` FOREIGN KEY (`role_id`) REFERENCES `role` (`role_id`) ON DELETE CASCADE ON UPDATE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci COMMENT='用户角色关联表';

-- ----------------------------
-- Records of user_role
-- ----------------------------
BEGIN;
INSERT INTO `user_role` VALUES ('oGFtu6YjZHuqYMXauIqQKRDOnq2Q', '1524642948199759874', b'1');
INSERT INTO `user_role` VALUES ('6f3f15c2d6d4e6f9db3f75f4fe849fb8', '1524642387031244802', b'1');
INSERT INTO `user_role` VALUES ('6949957e74ac0c34fb6e5d0e3d531611', '1524642387031244802', b'1');
INSERT INTO `user_role` VALUES ('oGFtu6Y6YOKauWPMHZV36LXIQy9M', '1524642919015792641', b'1');
INSERT INTO `user_role` VALUES ('oGFtu6W6ZWr6Adyu0x9yvnS2XWuk', '1524642948199759874', b'1');
COMMIT;

-- ----------------------------
-- Table structure for worker
-- ----------------------------
DROP TABLE IF EXISTS `worker`;
CREATE TABLE `worker` (
  `worker_openid` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '唯一用户标识',
  `worker_nickname` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT NULL COMMENT '昵称',
  `worker_headimgurl` varchar(254) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT NULL COMMENT '头像',
  `worker_name` varchar(20) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '姓名',
  `worker_phone` varchar(11) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '手机号',
  `worker_email` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '邮件',
  `worker_register_time` datetime NOT NULL COMMENT '注册时间',
  PRIMARY KEY (`worker_openid`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci COMMENT='维修用户';

-- ----------------------------
-- Records of worker
-- ----------------------------
BEGIN;
INSERT INTO `worker` VALUES ('oGFtu6Y6YOKauWPMHZV36LXIQy9M', '假朋友i', 'https://thirdwx.qlogo.cn/mmopen/vi_32/7ARiajsxHib5r63Y95azeI7dFcLfgPN1knN2KhPsHriaZwgEYyglXGOf7u9z1HIaqRUSGoKRlWj0Ca2wLsiaDTEd5g/132', '张健强', '15281056531', 'scitctocdtu@qq.com', '2022-05-19 23:40:40');
COMMIT;

SET FOREIGN_KEY_CHECKS = 1;
